package com.bestcem.xm.common.core.sql;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.util.CollectionUtils;

import java.util.List;
import java.util.Map;
import java.util.Set;

@Getter
@Setter
@ToString
public class GraphSortResult<V> {
    private int round = 1;
    private List<V> sortedVertexes;
    private Set<V> circleVertexes;
    private Map<V, Set<V>> circleEdges;

    public boolean hasCircle() {
        return !CollectionUtils.isEmpty(circleVertexes);
    }
}
